<?php 
  $config = ProjectConfiguration::getActive();
  $environment = $config->getEnvironment();
?>
<?php if(isset($form) && $form->hasErrors()): ?>
	<div id="system-message" class="error">
		<div class="message">
			<h3>Error!</h3>
		    <?php foreach($form->getErrorSchema()->getErrors() as $name => $error): ?>
		      <p style="color: #fff"><?php echo $environment == 'dev' ? "$name : $error" : $error ?></p>
		    <?php endforeach; ?>
		</div>
	</div>
<?php elseif($message = $sf_user->getFlash('error')): ?>
	<div id="system-message" class="error">
		<div class="message">
			<h3>Error!</h3>
		      <p style="color: #fff;"><?php echo $message ?></p>
		</div>
	</div>
<?php elseif($message = $sf_user->getFlash('success')): ?>
	<div id="system-message" class="success">
		<div class="message">
			<h3>Success!</h3>
		      <p style="color: #fff"><?php echo $message ?></p>
		</div>
	</div>
<?php elseif($message = $sf_user->getFlash('warning')): ?>
	<div id="system-message" class="warning">
		<div class="message">
			<h3>Warning!</h3>
		      <p><?php echo $message ?></p>
		</div>
	</div>
<?php elseif($message = $sf_user->getFlash('notice')): ?>
	<div id="system-message">
		<div class="message">
			<h3>Message!</h3>
		      <p><?php echo $message ?></p>
		</div>
	</div>				
<?php endif; ?>
